package com.bean;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;


/**
 * Parkinfo entity. @author MyEclipse Persistence Tools
 */

public class Parkinfo  implements java.io.Serializable {


    // Fields    

     /** serialVersionUID*/
	private static final long serialVersionUID = -4841128138323682590L;
	private Integer PId;
     private String PName;
     private String PDesc;
     private Short PType;
     private String PTypeName;
     private Double dayPrice;
     private Double nightPrice;
     private Integer orderable;
     private String addr;
     private String telePhone;
     private Integer remainderParkNumber;
     private Integer parkNumber;
     private Double score;
     private Double longitude;
     private Double latitude;
     private Timestamp createTime;
     private Timestamp updateTime;
     private Short source;
     private String dayStartTime;
     private String dayEndTime;
     private String nightStartTime;
     private String nightEndTime;
     private Double dayTimeUtil;
     private Double nightTimeUtil;
     private Short switchEditAmount;
     private Short switchGratuity;
     private Short isFree;
     private Integer minGratuity;
     private Integer commentCount;
     private Integer tradeCount;
     private Short attribution;
     private String businessNo;
     private String enterpriseName;
     private Short status;
     private String statusName;
     private Integer location;
     
     private Set parkManagers = new HashSet(0);
     private Set parkOrders = new HashSet(0);

     private Boolean checked;
     private Integer year;
     private Integer month;
     private Integer day;
     private Long countOrder;

    // Constructors

    /** default constructor */
    public Parkinfo() {
    }
    public Parkinfo(Integer year,Integer month,Long countOrder,Short status) {
    	this.year=year;
    	this.month=month;
    	this.countOrder=countOrder;
    	this.status=status;
    }
    public Parkinfo(Integer year,Integer month,Integer day,Long countOrder,Short status) {
    	this.year=year;
    	this.month=month;
    	this.countOrder=countOrder;
    	this.day=day;
    	this.status=status;
    }
	/** minimal constructor */
    public Parkinfo(String PName, Short PType, Double dayPrice, Double nightPrice, String addr, String telePhone, Integer remainderParkNumber, Integer parkNumber, Timestamp createTime, Timestamp updateTime, Short source, Short status) {
        this.PName = PName;
        this.PType = PType;
        this.dayPrice = dayPrice;
        this.nightPrice = nightPrice;
        this.addr = addr;
        this.telePhone = telePhone;
        this.remainderParkNumber = remainderParkNumber;
        this.parkNumber = parkNumber;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.source = source;
        this.status = status;
    }
    
    /** full constructor */
    public Parkinfo(String PName, String PDesc, Short PType, Double dayPrice, Double nightPrice, Integer orderable, String addr, String telePhone, Integer remainderParkNumber, Integer parkNumber, Double score, Double longitude, Double latitude, Timestamp createTime, Timestamp updateTime, Short source,
    			String dayStartTime, String dayEndTime, String nightStartTime, String nightEndTime, Double dayTimeUtil, Double nightTimeUtil, Short switchEditAmount, Short switchGratuity, Short isFree, Integer minGratuity, Integer commentCount, Integer tradeCount, Short attribution, String businessNo, String enterpriseName, Short status, Set parkManagers, Set parkOrders) {
        this.PName = PName;
        this.PDesc = PDesc;
        this.PType = PType;
        this.dayPrice = dayPrice;
        this.nightPrice = nightPrice;
        this.orderable = orderable;
        this.addr = addr;
        this.telePhone = telePhone;
        this.remainderParkNumber = remainderParkNumber;
        this.parkNumber = parkNumber;
        this.score = score;
        this.longitude = longitude;
        this.latitude = latitude;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.source = source;
        this.dayStartTime = dayStartTime;
        this.dayEndTime = dayEndTime;
        this.nightStartTime = nightStartTime;
        this.nightEndTime = nightEndTime;
        this.dayTimeUtil = dayTimeUtil;
        this.nightTimeUtil = nightTimeUtil;
        this.switchEditAmount = switchEditAmount;
        this.switchGratuity = switchGratuity;
        this.isFree = isFree;
        this.minGratuity = minGratuity;
        this.commentCount = commentCount;
        this.tradeCount = tradeCount;
        this.attribution = attribution;
        this.businessNo = businessNo;
        this.enterpriseName = enterpriseName;
        this.status = status;
        this.parkManagers = parkManagers;
        this.parkOrders = parkOrders;
    }

   
    // Property accessors

    public Integer getPId() {
        return this.PId;
    }
    
    public void setPId(Integer PId) {
        this.PId = PId;
    }

    public String getPName() {
        return this.PName;
    }
    
    public void setPName(String PName) {
        this.PName = PName;
    }

    public String getPDesc() {
        return this.PDesc;
    }
    
    public void setPDesc(String PDesc) {
        this.PDesc = PDesc;
    }

    public Short getPType() {
        return this.PType;
    }
    
    public void setPType(Short PType) {
        this.PType = PType;
        
        
        //车场状态: 停车场类型（1：地上停车场；2：地下停车场；3：楼宇停车场）
        switch(PType){
        case 1:
        	this.setPTypeName("地上停车场");
        	break;
        case 2:
        	this.setPTypeName("地下停车场");
        	break;
        case 3:
        	this.setPTypeName("楼宇停车场");
        	break;
        default:
        	this.setPTypeName("未知");
        	
        }
        
    }

    public Double getDayPrice() {
        return this.dayPrice;
    }
    
    public void setDayPrice(Double dayPrice) {
        this.dayPrice = dayPrice;
    }

    public Double getNightPrice() {
        return this.nightPrice;
    }
    
    public void setNightPrice(Double nightPrice) {
        this.nightPrice = nightPrice;
    }

    public Integer getOrderable() {
        return this.orderable;
    }
    
    public void setOrderable(Integer orderable) {
        this.orderable = orderable;
    }

    public String getAddr() {
        return this.addr;
    }
    
    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getTelePhone() {
        return this.telePhone;
    }
    
    public void setTelePhone(String telePhone) {
        this.telePhone = telePhone;
    }

    public Integer getRemainderParkNumber() {
        return this.remainderParkNumber;
    }
    
    public void setRemainderParkNumber(Integer remainderParkNumber) {
        this.remainderParkNumber = remainderParkNumber;
    }

    public Integer getParkNumber() {
        return this.parkNumber;
    }
    
    public void setParkNumber(Integer parkNumber) {
        this.parkNumber = parkNumber;
    }

    public Double getScore() {
        return this.score;
    }
    
    public void setScore(Double score) {
        this.score = score;
    }

    public Double getLongitude() {
        return this.longitude;
    }
    
    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return this.latitude;
    }
    
    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public Timestamp getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return this.updateTime;
    }
    
    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public Short getSource() {
        return this.source;
    }
    
    public void setSource(Short source) {
        this.source = source;
    }

    public String getDayStartTime() {
        return this.dayStartTime;
    }
    
    public void setDayStartTime(String dayStartTime) {
        this.dayStartTime = dayStartTime;
    }

    public String getDayEndTime() {
        return this.dayEndTime;
    }
    
    public void setDayEndTime(String dayEndTime) {
        this.dayEndTime = dayEndTime;
    }

    public String getNightStartTime() {
        return this.nightStartTime;
    }
    
    public void setNightStartTime(String nightStartTime) {
        this.nightStartTime = nightStartTime;
    }

    public String getNightEndTime() {
        return this.nightEndTime;
    }
    
    public void setNightEndTime(String nightEndTime) {
        this.nightEndTime = nightEndTime;
    }

    public Double getDayTimeUtil() {
        return this.dayTimeUtil;
    }
    
    public void setDayTimeUtil(Double dayTimeUtil) {
        this.dayTimeUtil = dayTimeUtil;
    }

    public Double getNightTimeUtil() {
        return this.nightTimeUtil;
    }
    
    public void setNightTimeUtil(Double nightTimeUtil) {
        this.nightTimeUtil = nightTimeUtil;
    }

    public Short getSwitchEditAmount() {
        return this.switchEditAmount;
    }
    
    public void setSwitchEditAmount(Short switchEditAmount) {
        this.switchEditAmount = switchEditAmount;
    }

    public Short getSwitchGratuity() {
        return this.switchGratuity;
    }
    
    public void setSwitchGratuity(Short switchGratuity) {
        this.switchGratuity = switchGratuity;
    }

    public Short getIsFree() {
        return this.isFree;
    }
    
    public void setIsFree(Short isFree) {
        this.isFree = isFree;
    }

    public Integer getMinGratuity() {
        return this.minGratuity;
    }
    
    public void setMinGratuity(Integer minGratuity) {
        this.minGratuity = minGratuity;
    }

    public Integer getCommentCount() {
        return this.commentCount;
    }
    
    public void setCommentCount(Integer commentCount) {
        this.commentCount = commentCount;
    }

    public Integer getTradeCount() {
        return this.tradeCount;
    }
    
    public void setTradeCount(Integer tradeCount) {
        this.tradeCount = tradeCount;
    }

    public Short getAttribution() {
        return this.attribution;
    }
    
    public void setAttribution(Short attribution) {
        this.attribution = attribution;
    }

    public String getBusinessNo() {
        return this.businessNo;
    }
    
    public void setBusinessNo(String businessNo) {
        this.businessNo = businessNo;
    }

    public String getEnterpriseName() {
        return this.enterpriseName;
    }
    
    public void setEnterpriseName(String enterpriseName) {
        this.enterpriseName = enterpriseName;
    }

    public Short getStatus() {
        return this.status;
    }
    
    public void setStatus(Short status) {
        this.status = status;
        //车场状态: -2：暂停营业中；-1：已删除；0：已冻结；1：未审核；2：审核中；3：正常
        switch(status){
        case -2:
        	this.setStatusName("暂停营业");
        	break;
        case -1:
        	this.setStatusName("已删除");
        	break;
        case 0:
        	this.setStatusName("已冻结");
        	break;
        case 1:
        	this.setStatusName("未审核");
        	break;
        case 2:
        	this.setStatusName("审核中");
        	break;
        case 3:
        	this.setStatusName("正常");
        	break;
        default:
        	this.setStatusName("异常");
        	
        }
    }

    public Set getParkManagers() {
        return this.parkManagers;
    }
    
    public void setParkManagers(Set parkManagers) {
        this.parkManagers = parkManagers;
    }

    public Set getParkOrders() {
        return this.parkOrders;
    }
    
    public void setParkOrders(Set parkOrders) {
        this.parkOrders = parkOrders;
    }

	/**
	 * @return the checked
	 */
	public Boolean getChecked() {
		return checked;
	}

	/**
	 * @param checked the checked to set
	 */
	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	/**
	 * @return the statusName
	 */
	public String getStatusName() {
		return statusName;
	}

	/**
	 * @param statusName the statusName to set
	 */
	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	public String getPTypeName() {
		return PTypeName;
	}

	public void setPTypeName(String pTypeName) {
		PTypeName = pTypeName;
	}
	public Integer getYear() {
		return year;
	}
	public void setYear(Integer year) {
		this.year = year;
	}
	public Integer getMonth() {
		return month;
	}
	public void setMonth(Integer month) {
		this.month = month;
	}
	public Integer getDay() {
		return day;
	}
	public void setDay(Integer day) {
		this.day = day;
	}
	public Long getCountOrder() {
		return countOrder;
	}
	public void setCountOrder(Long countOrder) {
		this.countOrder = countOrder;
	}
	public Integer getLocation() {
		return location;
	}
	public void setLocation(Integer location) {
		this.location = location;
	}
}